using UnityEngine;
using System.Collections;
using System.Numerics;



//1 = 1微米
[System.Serializable]
public class BigIntVector
{
	public string x = "0";
	public string y = "0";
	public string z = "0";
	public BigInteger i_x;
	public BigInteger i_y;
	public BigInteger i_z;
	
	
	public void InitFromOut()
	{
		i_x = BigInteger.Parse(x);
		i_y = BigInteger.Parse(y);
		i_z = BigInteger.Parse(z);
	}
	
	public override string ToString()
	{
		return i_x.ToString() + i_y.ToString() + i_z.ToString();
	}
	
	
	public Vector3 ToVector3()
	{
		return new Vector3( (float)(((double)i_x)*ScaleTransform.wroldscale) , (float)(((double)i_y)*ScaleTransform.wroldscale), (float)(((double)i_z)*ScaleTransform.wroldscale));
	}
	
	
	public static BigIntVector operator+(BigIntVector left, BigIntVector right)
	{
		BigIntVector ret = new BigIntVector();
		ret.i_x = left.i_x + right.i_x;
		ret.i_y = left.i_y + right.i_y;
		ret.i_z = left.i_z + right.i_z;
		
		return ret;
	}
	
	public static BigIntVector operator-(BigIntVector left, BigIntVector right)
	{
		BigIntVector ret = new BigIntVector();
		ret.i_x = left.i_x - right.i_x;
		ret.i_y = left.i_y - right.i_y;
		ret.i_z = left.i_z - right.i_z;
		
		return ret;
	}
}
